import Vue from 'vue'
import VueRouter from 'vue-router'
import Contant from '../components/contant/contant.vue'
import Power from '../components/Power/Power.vue'
import List from '../articles/list.vue'

Vue.use(VueRouter)

// const routes = [
//   { path: '/login', component: () => import('../views/login') },
//   {
//     path: '/',
//     component: () => import('../views/home'),
//     children: [
//       {
//         path: '/questions/new',
//         component: () => import('../views/questions/new.vue')
//       }
//     ]
//   }
// ]

const routes = [
  {
    path: '/',
    redirect: '/articles/list'
  },
  {
    path: '/articles/list',
    component: List
  }
]

const router = new VueRouter({
  routes: [
    { path: '/contant', component: Contant },
    { path: '/power', component: Power }
  ]
})

export default router
